
#ifndef HTTP_TO_HJ212_H__
#define HTTP_TO_HJ212_H__

#include "types.h"
#include "csvparser.h"
#include "yapiparser.h"
#include "hj212packet.h"
#include "tcpclient.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _tag_http_to_hj212_t
{
    YapiSerConfig* yapiserconf;
    Hj212SerConfig* hj212serconf;
    CsvParser* csvparser;
    YapiParser* yapiparser;
    HJ212PackFact* hj212dev;
    EnvProDev* envprodev;
    TcpClient* tcpclient;
} HtHJDev;


HtHJDev* hthj_ctreat(const char* inifile);

HtHJDev* hthj_destroy(HtHJDev* hjdev);
void register_csv_parser(HtHJDev* dev, CsvParser* parser);

void register_yapi_parser(HtHJDev* dev, YapiParser* parser);

void register_hj212_dev(HtHJDev* dev, HJ212PackFact* hj212dev);

void register_envpro_dev(HtHJDev* dev, EnvProDev* envprodev);

void register_tcp_client(HtHJDev* dev, TcpClient* client);

#ifdef __cplusplus
}
#endif


#endif